~(() => {
  let name: string = "henry";
  let age: number = 18;
  let bool: boolean = true;
  let nu: null = null;
  let und: undefined = undefined;
  let unionType: number | string | boolean = "wuwuwu";
  let arr: Array<string | number> = ["hello", 22];
  let arr2: string[] = ["hello"];

  let colors: [string, number, string] = ["xxx", 22, "yyyy"];

  enum Color {
    name = "henry",
    age = 18,
    Orange = "red",
  }

  // console.log(Color);

  let myColor: Color = Color.Orange;
  // console.log(myColor);

  interface ClassInfo {
    id: number;
    name: string;
    address?: string;
    fn: () => void;
  }

  let c1: ClassInfo = {
    id: 1,
    name: "高一222班",
    fn() {},
  };
  class Classs implements ClassInfo {
    id = 2021;
    name = "xxx";
    fn() {}
  }

  // 泛型
  // function fun<T>(arg: Array<T>): Array<T> {
  //   let len = arg.length;
  //   console.log(len);
  //   return arg;
  // }
  // let res = fun([22, 18]);
  // console.log(res);

  interface loginInfo {
    <T>(arg: T): T;
  }
})();
